#include <iostream>

template <int N>
struct Factorial {
    static constexpr int value = N * Factorial<N - 1>::value;
};

template <>
struct Factorial<0> {
    static constexpr int value = 1;
};

int main() {
    constexpr int f5 = Factorial<5>::value;
    constexpr int f0 = Factorial<0>::value;
    constexpr int f3 = Factorial<3>::value;

    std::cout << "Factorial<5>::value: " << f5 << std::endl;  // 输出 120
    std::cout << "Factorial<0>::value: " << f0 << std::endl;  // 输出 1
    std::cout << "Factorial<3>::value: " << f3 << std::endl;  // 输出 6

    return 0;
}